<!-- 未来30天游客量趋势图 -->
<template>
  <div class="line">
    <!-- 顶部 -->
    <div class="top">
      <div>未来30天游客量趋势图</div>
      <img src="../../images/dataScreen-title.png" alt="" />
    </div>

    <!-- 折线图 -->
    <div class="bom">
      <div ref="line_chart" class="line_chart"></div>
    </div>
  </div>
</template>

<script setup>
//引入echarts
import * as echarts from "echarts";
//引入echarts的配置项
import { lineOption } from "@/config/echarts/config";
//初始化柱状图
let line_chart = ref();
onMounted(() => {
  let myCharts = echarts.init(line_chart.value);
  //配置数据主要是是pieOption.series[0].data
  myCharts.setOption(lineOption);
});
</script>

<style lang="scss" scoped>
.line {
  flex: 1.5;
  margin: 0 30px;
  background: url(../../images/dataScreen-main-cb.png) no-repeat;
  background-size: 100% 100%;
  display: flex;
  flex-direction: column;

  .top {
    color: white;
    font-size: 16px;
  }

  .bom {
    flex: 1;
    .line_chart {
      width: 100%;
      height: 100%;
    }
  }
}
</style>
